package com.hucais.etl.job.controller

import com.hucais.core.utils.{DefaultPropertiesUtil, SparkDefaultUtil}
import com.hucais.etl.job.service.DwdRankingService

object DwdRankingController {
  def main(args: Array[String]): Unit = {
    // 获取SparkSession
    val sparkSession = SparkDefaultUtil.getSession(isLocal = true, this.getClass.getSimpleName, withEs = false, withHive = true)
//        val sparkSession = SparkDefaultUtil.getSession(isLocal = false, this.getClass.getSimpleName, withEs = false, withHive = true)
    val ssc = sparkSession.sparkContext
    ssc.hadoopConfiguration.set("fs.defaultFS", DefaultPropertiesUtil.get("fs.defaultFS"))


    DwdRankingService.action(ssc, sparkSession)
  }

}
